<template>
    <Card :bordered="false" dis-hover>
        <Tabs :value="tab" :animated="false" @on-click="changetab">
            <TabPane label="本月" name="1">
                <tablelist ref="diseasestablelist1" month_type="1"></tablelist>
            </TabPane>
            <TabPane label="前三个月" name="2">
                <tablelist ref="diseasestablelist2" month_type="2"></tablelist>
            </TabPane>
            <TabPane label="老数据" name="3">
                <tablelist ref="diseasestablelist3" month_type="3"></tablelist>
            </TabPane>
        </Tabs>
    </Card>
</template>
<script>
    import tablelist from './tablelist';
    export default {
        name: 'diseases',
        data() {
            return {
                tab: '1'
            }; 
        },
        components: { tablelist },
        mounted() {
            this.$refs[`diseasestablelist${1}`].initial(this.tab);
        },
        methods: {
            changetab(e) {
                this.$refs[`diseasestablelist${e}`].initial(e);

            }
        },
    };
</script>